<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 100px;
        height: 100px;
        background-color: pink;
        animation-name: move;
        animation-duration: 10s;
        /* 默认盒子在动画结束后停留在开始位置 */
        /* 想要停留在结束位置 */
        animation-fill-mode: forwards;
      }

      @keyframes move {
        100% {
          transform: translateX(800px) rotate(180deg);
        }
      }
      .box:hover {
          animation-play-state: paused;
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
  </body>
</html>
